import request from '@/utils/request'

// 获取品牌列表
export function getBrandList (params) {
  return request({
    url: '/goods/brand',
    method: 'get',
    params: params
  })
}
// 新增品牌
export function setBrand (params) {
  return request({
    url: '/goods/brand',
    method: 'post',
    data: params
  })
}
// 修改品牌
export function updateBrand (id, params) {
  console.log(id, params)
  return request({
    url: '/goods/brand/' + id,
    method: 'put',
    data: params
  })
}
// 修改品牌启用状态
export function updateBrandStatus (id, params) {
  return request({
    url: `/goods/brand/${id}/enable`,
    method: 'put',
    data: params
  })
}
// 上传品牌商品
export function uploadBrandGoods (id, params) {
  return request({
    url: `/goods/brand/${id}/importSku`,
    method: 'post',
    data: params
  })
}
// 删除品牌中的商品
export function deleteBrandGoods (id, skuId) {
  return request({
    url: `/goods/brand/${id}/sku/${skuId}`,
    method: 'delete',
  })
}






